package com.fzy.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName t_customer
 */
@TableName(value ="t_customer")
@Data
public class Customer implements Serializable {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long cusId;

    /**
     * 客户姓名
     */
    private String cusName;

    /**
     * 性别：男1；女0
     */
    private Integer cusSex;

    /**
     * 年龄
     */
    private Integer cusAge;

    /**
     * 电话
     */
    private Long cusPhone;

    /**
     * 邮箱
     */
    private String cusEmail;

    /**
     * 标记，后期扩充字段
     */
    private String cusRemark;

    /**
     * 
     */
    private Date gmtCreate;

    /**
     * 
     */
    private Date gmtModified;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Customer other = (Customer) that;
        return (this.getCusId() == null ? other.getCusId() == null : this.getCusId().equals(other.getCusId()))
            && (this.getCusName() == null ? other.getCusName() == null : this.getCusName().equals(other.getCusName()))
            && (this.getCusSex() == null ? other.getCusSex() == null : this.getCusSex().equals(other.getCusSex()))
            && (this.getCusAge() == null ? other.getCusAge() == null : this.getCusAge().equals(other.getCusAge()))
            && (this.getCusPhone() == null ? other.getCusPhone() == null : this.getCusPhone().equals(other.getCusPhone()))
            && (this.getCusEmail() == null ? other.getCusEmail() == null : this.getCusEmail().equals(other.getCusEmail()))
            && (this.getCusRemark() == null ? other.getCusRemark() == null : this.getCusRemark().equals(other.getCusRemark()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCusId() == null) ? 0 : getCusId().hashCode());
        result = prime * result + ((getCusName() == null) ? 0 : getCusName().hashCode());
        result = prime * result + ((getCusSex() == null) ? 0 : getCusSex().hashCode());
        result = prime * result + ((getCusAge() == null) ? 0 : getCusAge().hashCode());
        result = prime * result + ((getCusPhone() == null) ? 0 : getCusPhone().hashCode());
        result = prime * result + ((getCusEmail() == null) ? 0 : getCusEmail().hashCode());
        result = prime * result + ((getCusRemark() == null) ? 0 : getCusRemark().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", cusId=").append(cusId);
        sb.append(", cusName=").append(cusName);
        sb.append(", cusSex=").append(cusSex);
        sb.append(", cusAge=").append(cusAge);
        sb.append(", cusPhone=").append(cusPhone);
        sb.append(", cusEmail=").append(cusEmail);
        sb.append(", cusRemark=").append(cusRemark);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}